import { sequelize } from '../../db';
import { DataTypes, Model } from 'sequelize';
class Group extends Model { }

Group.init({
    groupName: DataTypes.STRING,
    UserId: DataTypes.INTEGER,
    type: DataTypes.STRING,//C2C|group
    readed: {
        type: DataTypes.INTEGER,
        defaultValue: 0
    },
    lastMessage: DataTypes.INTEGER,
    deleted: {
        type: DataTypes.INTEGER,
        defaultValue: 0
    }
}, {
    sequelize,
    paranoid: true
});

export default Group